import request from '@/utils/request'

// 查询工艺路线
export function query(routerBo) {
  return request({
    url: `/md/router/query?router=${routerBo}`,
    method: 'get'
  })
}
// 保存工艺路线
export function save(data) {
  return request({
    url: `/md/router/save`,
    method: 'post',
    data
  })
}
// 删除工艺路线
export function remove(routerBo) {
  return request({
    url: `/md/router/delete?bo=${routerBo}`,
    method: 'get'
  })
}

export function queryDiy(data) {
  return request({
    url: `/md/customDatas/query?customDataType=${data}`,
    method: 'get'
  })
}

// 生产工艺查询
export function queryProduction(data) {
  return request({
    url: `/md/commonBrowsers/selectPageRouter`,
    method: 'post',
    data
  })
}

// 修改工艺路线当前版本
export function updateRouterVersion(bo, isCurrentVersion, router) {
  return request({
    url: `/md/router/updateRouterVersion?routerBo=${bo}&isCurrentVersion=${isCurrentVersion}&router=${router}`,
    method: 'get'
  })
}

// 导入文件
export function importExcel(data) {
  return request({
    url: `md/router/importRouter`,
    method: 'post',
    data
  })
}
